<!DOCTYPE html>
<html> 
<head>
<meta charset="UTF-8">
<title>简历</title>
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/main.js"></script>
<script type="text/javascript" src="js/FileSaver.js"></script>
<script type="text/javascript" src="js/jquery.wordexport.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/temp_resume.css">
<style type="text/css">
body{
	background-color: #fff;
}
.main-head table{
    height: 110px;
    background-color: #8D8D8D;
    color: #fff;
    padding: 0 20px;
    display: inline-table;
}
.main-content {
    margin-top: 10px;
}
.main-title{
    background-color: #cccccc;
    color: #333;
    font-size: 24px;
    line-height: 35px;
    padding-left: 0px;
    margin-left: 0px;
    width: 800px;
}
.main-title .text{
	margin-left: 10px;
}
pre {
    display: block;
    padding: 9.5px;
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.428571429;
}
/**工作经历*/
.comp-name,.comp-type, .work-post,.work-depart{
	line-height:30px;
	font-weight: bold;
	font-size: 14px;
	color: #333;
}
.comp-name span,.comp-type span,.work-post span,.work-depart span{
	padding: 0 10px;
	margin-left: -10px;
}
.comp-type,.comp-info,.work-post,.work-depart,.work-zn,.work-yj,.project-jy{
	margin-left:40px;
}
.school {
    line-height: 30px;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}
.jnjl-title{
	font-size: 16px;
	font-weight: bold;	
	color: #333;
	line-height: 30px;
}
.jnjl{
    font-size: 13px;
    font-weight: normal;
    color: #333;
    line-height: 30px;
    float: left;
    width: 50%;
    padding: 0 20px 0 0;
}
</style>
</head>
<body>
<table align="center" width="660">
<tr><td>
	<div class="div-main">
		<!-- 头部信息 -->
		<div class="main-head" >	
			<table>
			<tr>
				<td>
				
					<div class="head-name">未获取到</div>
					<div class="head-introduce">
					<span class="item" style="padding: 0 5px;"><span class="glyphicon glyphicon-flag"></span><span class="state"></span></span>
					<span class="item" style="padding: 0 5px;"><span class="glyphicon glyphicon-phone"></span><span class="tel"></span></span>
					<span class="item" style="padding: 0 5px;"><span class="glyphicon glyphicon-envelope"></span><span class="email"></span></span>
					</div>
					<div class="head-introduce">
						<span class="glyphicon glyphicon-user"></span>
						<span class="sex"></span>|
						<span class="age"></span>岁
						<span class="borth"></span>|
						<span class="addred"></span>|
						<span class="worktime"></span>|
						<span class="marriage"></span>|
						<span class="dereen"></span>
					</div>
				</td>
				<td width="1%">
					<div class="head-log"><img src="img/logo.png"/></div>
				</td>
			</tr>
			</table>		
		</div>
		<!-- 自我评价-->
		<div class="main-content content-zwpj">
			<div class="main-title" ><span class="glyphicon glyphicon-comment"></span><span>&nbsp;自我评价</span></div>
			<div>
				<table>
					<tr>
					<td valign="top">
						<pre class="zwpj-left"></pre>
					</td>
					<td width="1%">
						<div class="zwpj-right"><img id="user-heard-img" alt="" src="" onerror="this.src='img/head.jpg'"  height="150" width="120"></div>
					</td>
					</tr>
				</table>
			</div>
		</div>
		<!-- 工作经历 通过html模版添加-->
		<div class="main-content content-gzjl">
			<div class="main-title"><span class="glyphicon glyphicon-calendar"></span><span>&nbsp;工作经历</span></div>
			
		</div>
		
		<!-- 教育经历-->
		<div class="main-content content-jyjl">
			<div class="main-title"><span class="glyphicon glyphicon-book"></span><span>&nbsp;教育经历</span></div>
					
		</div>
		
		<!-- 培训经理-->
		<div class="main-content content-pxjl">
			<div class="main-title"><span class="glyphicon glyphicon-book"></span>&nbsp;培训经历</div>
					
		</div>
		
		<!-- 技能及奖励-->
		<div class="main-content content-jnjl">
			<div class="main-title"><span class="glyphicon glyphicon-star-empty"></span>&nbsp;技能及奖励</div>
			<ul class="item">
				<li><span class="jnjl-title">技能</span><div class="jnjl jn"></div></li>
				<li><span class="jnjl-title">资格证书</span><div class="jnjl zs"></div></li>
				<li><span class="jnjl-title">奖励</span><div class="jnjl jl"></div></li>
				<!-- <li>语言能力<div class="jnjl yy"></div></li> -->
				<li><span class="jnjl-title">其他</span><div class="jnjl qt"></div></li>
			</ul>
		</div>
		
		<!-- 附加信息-->
		<div class="main-content content-fjxx">
			<div class="main-title"><span class="glyphicon glyphicon-paperclip"></span><span>&nbsp;附加信息</span></div>
			<pre class="other"></pre>
		</div>
	</div>
</td></tr>
</table>
<!-- 工作经历html模版 -->
<div id="temp-gzjl" style="display: none">
	<div class="item">
		<div class="comp-name">
			<span class="time"></span>
			<span class="name"></span>
			<span class="counttime"></span>
		</div>
		<div class="comp-type">
			<span class="type"></span>|
			<span class="trade"></span>|
			<span class="users"></span>
		</div>
		<pre class="comp-info"></pre>
		<div class="work-post">
			<span class="depart"></span>|
			<span class="time"></span>|
			<span class="money"></span>元/月
		</div>
		<div class="work-depart">
			<span class="lader"></span>
			<span class="user"></span>
			<span class="eare"></span>
			<span class="depart"></span>
		</div>
		<div class="work-zn">
			<div class="title">工作职能</div>
			<pre class="post"></pre>
		</div>
		<div class="work-yj">
			<div class="title">工作业绩</div>
			<pre class="post"></pre>
		</div>
		<!-- 
		<div class="project-jy">
			<div class="title">项目经验</div>
			<pre class="post"></pre>
		</div>
		 -->
	</div>
</div>
<!-- 教育经历html模版 -->
<div id="temp-jyjl" style="display: none">
<div class="item">
	<div class="school">
		<span class="time"></span>
		<span class="name"></span>
		<span class="major"> </span>
		<span class="degreen"></span>
		<span class="istz"></span>
	</div>
	<div class="about">
		<div class="title">校内表现</div>
		<pre class="content"></pre>
	</div>
</div>	
</div>
</body>
<script type="text/javascript">
$(function(){	
	var cid = GetQueryString("cid");
	if(cid==null){
		alert("参数不正确");
	}else{
		initdata(cid,initResume);
	}
})
/**
 * 初始化简历
 */
function initResume(){
		var html_name = "简历";
		if($(".main-head .head-name").text()!=null&&$(".main-head .head-name").text()!=""){
			html_name = $(".main-head .head-name").text();
		}
		//export_raw(html_name+".html", html_val);
		
		printt("html",html_name);
		
		/*var html = $("html").html();
		var name = r.name;
		var mydata = {
			type:'export2world',
			content:html,
			name:name
		};
		mydata = JSON.stringify(mydata);
		$("form input").val(mydata);
		$("form").submit();*/
		/*var html = $("html").html();
		alert(html);
		var name = r.name;
		$("#word_name").val(name);
		$("#word_content").val(html);
		$("form")[0].submit();*/
}
/**
 * 获取地址栏后面的参数
 */
function GetQueryString(name)
{
     var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
     var r = window.location.search.substr(1).match(reg);
     if(r!=null)return  unescape(r[2]); return null;
}
function fake_click(obj) {  
    var ev = document.createEvent("MouseEvents");  
    ev.initMouseEvent(  
        "click", true, false, window, 0, 0, 0, 0, 0  
        , false, false, false, false, 0, null  
        );  
    obj.dispatchEvent(ev);  
}  
  
function export_raw(name, data) { 
    var urlObject = window.URL || window.webkitURL || window;  
  
    var export_blob = new Blob([data]);  
  
    var save_link = document.createElementNS("http://www.w3.org/1999/xhtml", "a")  
    save_link.href = urlObject.createObjectURL(export_blob);  
    save_link.download = name;  
    fake_click(save_link);  
}  
function printt(content,name){
	var css1 = "";
	var css2 = "";
	$.get("css/bootstrap.min.css",function(d1){
		css1 = d1;
		$.get("css/temp_resume.css",function(d2){
			css2 = d2;
			
			styles = "<!-- ";			
			//styles+=css1;
			styles+=css2;
			styles+=" -->";
			setTimeout(function(){$(content).wordExport(name);},500);
		})
	})
}
function printdy(){
	var html_name = "简历";
	if($(".main-head .head-name").text()!=null&&$(".main-head .head-name").text()!=""){
		html_name = $(".main-head .head-name").text();
	}
	printt("html",html_name);
}
//创建Base64对象  
var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="";var n,r,i,s,o,u,a;var f=0;e=Base64._utf8_encode(e);while(f<e.length){n=e.charCodeAt(f++);r=e.charCodeAt(f++);i=e.charCodeAt(f++);s=n>>2;o=(n&3)<<4|r>>4;u=(r&15)<<2|i>>6;a=i&63;if(isNaN(r)){u=a=64}else if(isNaN(i)){a=64}t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a)}return t},decode:function(e){var t="";var n,r,i;var s,o,u,a;var f=0;e=e.replace(/[^A-Za-z0-9+/=]/g,"");while(f<e.length){s=this._keyStr.indexOf(e.charAt(f++));o=this._keyStr.indexOf(e.charAt(f++));u=this._keyStr.indexOf(e.charAt(f++));a=this._keyStr.indexOf(e.charAt(f++));n=s<<2|o>>4;r=(o&15)<<4|u>>2;i=(u&3)<<6|a;t=t+String.fromCharCode(n);if(u!=64){t=t+String.fromCharCode(r)}if(a!=64){t=t+String.fromCharCode(i)}}t=Base64._utf8_decode(t);return t},_utf8_encode:function(e){e=e.replace(/rn/g,"n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r)}else if(r>127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t},_utf8_decode:function(e){var t="";var n=0;var r=c1=c2=0;while(n<e.length){r=e.charCodeAt(n);if(r<128){t+=String.fromCharCode(r);n++}else if(r>191&&r<224){c2=e.charCodeAt(n+1);t+=String.fromCharCode((r&31)<<6|c2&63);n+=2}else{c2=e.charCodeAt(n+1);c3=e.charCodeAt(n+2);t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63);n+=3}}return t}}  
</script>
</html>